# Maintainer: Fabian Bornschein <fabiscafe-at-mailbox-dot-org>
# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=gnome-logs
pkgver=45beta
pkgrel=1
pkgdesc="A log viewer for the systemd journal"
url="https://wiki.gnome.org/Apps/Logs"
arch=(loong64 x86_64)
license=(GPL)
depends=(
  dconf
  glib2
  gsettings-desktop-schemas
  gtk4
  hicolor-icon-theme
  libadwaita
  pango
  systemd
)
makedepends=(
  appstream-glib
  git
  meson
  yelp-tools
)
groups=(gnome)
_commit=ab027ff433c6f395f3beca54a7de8c3884e0fa4c  # tags/gnome-logs-45.beta^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-logs.git#commit=$_commit")
b2sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^gnome-logs-//;s/\.\([a-z]\)/\1/;s/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  local meson_options=(
    -D man=true
  )

  arch-meson $pkgname build "${meson_options[@]}"
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
